# coding:utf-8

default_dict = {'a': None, 'b': 1, 'c': 0, 'd': ''}
# 建议用in或not in
print('a' in default_dict)  # True
print(bool(default_dict['a']))  # False
print(bool(default_dict.get('a')))  # False
print(bool(default_dict.get('b')))  # True
print('f' in default_dict)  # False
print('f' not in default_dict)  # True